Integrated circuit with improved logic cells

ABSTRACT

The present invention provides integrated circuits with improved logic cells. In one embodiment, an integrated circuit having a plurality of logic cells (LC) is provided, each LC comprising: a lookup table having a LUT output terminal; and, a first multiplexer; wherein, a first multiplexer input terminal is connected to of a first input terminal of the LC, a second multiplexer input terminal is connected to the LUT output terminal, a multiplexer output terminal is connected to a first output terminal of the LC, and a multiplexer select terminal is connected to a second input terminal of the LC so as to select which of the signals appearing at the first and second multiplexer input terminal to pass through; wherein, by coupling in chain the first input terminal of one LC to the first output terminal of another LC, a WLUT chain is formed.

RIGHT OF PRIORITY OF PCT APPLICATION

This application claims the priority of an earlier filed PCT patentapplication Ser. No. PCT/CN2008/000227, filed on Jan. 30, 2008, withChina State Intellectual Property Office, hereby incorporated byreference.

TECHNICAL FIELD

This invention relates to an integrated circuit, and more particularly,to Field Programmable Gate Array (FPGA) logic cells.

BACKGROUND OF THE INVENTION

FPGA is an integrated circuit whose functionalities are designated byusers of the FPGA. A FPGA consists generally of a great number of logiccells.

A basic FPGA logic cell (referred below as LC) is shown as in FIG. 1,which comprises a look-up table (LUT) 102 and a D flip-flop (DFF) 108.The 4-input LUT 102 is shown to have a set of 16 configuration memorycells, which can be configured or programmed to compute any 4-inputcombinational logic function. Note that as the details of suchprogramming circuitry is not relevant to this type of invention, it isnot shown in FIG. 1. The output of the LUT 102 is not only directlyconnected to an output of the LC, but also fed into the D input terminalof DFF 108, the Q output of which is available as another LC output.Also not shown, the flip-flop 108 may also be provided with clock enableterminal, set terminal and/or reset terminal. Within the logic cell,multiplexers (MUX) and other logics may be provided to allow the Qoutput terminal of the flip-flop be connected to some input terminal ofthe LUT. In addition, output signals of logic cells may be routed toinput terminals of logic cells via some general-purpose interconnectionnetwork, in order to build any given digital logic circuit.

The basic logic cell is logically complete. However, there exist demandsfor more area and timing efficient and/or placement-friendly logic cellsand integrated circuits therefrom.

SUMMARY OF THE INVENTION

Therefore, it is an object of the present invention to provide a new LC,which may be interconnected and programmed to implement functions withmore area and timing efficiency and/or placement-friendliness.

According to a first aspect, the present invention provides anintegrated circuit having a plurality of logic cells, each of saidplurality of the logic cells comprising:

a first input terminal, a second input terminal, a plurality of thirdinput terminals, and a first output terminal;

a lookup table having a plurality of LUT input terminals, which arerespectively connected to said plurality of third input terminals of thelogic cell; and, a LUT output terminal;

a first multiplexer having a first multiplexer input terminal, a secondmultiplexer input terminal, a select terminal and an multiplexer outputterminal; wherein, the first multiplexer input terminal of the firstmultiplexer is connected to the first input terminal, the secondmultiplexer input terminal of the first multiplexer is connected to theLUT output terminal, the multiplexer output terminal of the firstmultiplexer is connected to the first output terminal, and the selectterminal is connected to the second input terminal and may be used toselect which of the signals appearing at first multiplexer inputterminal and the second multiplexer input terminal to pass through thefirst multiplexer;

wherein, by coupling in chain the first input terminal of one of theplurality of the logic cells to the first output terminal of another oneof the plurality of logic cells, a WLUT chain is formed.

According to a second aspect, the present invention provides anintegrated circuit having at least a first logic cell and a second logiccell,

the first logic cell comprising: a LUT having a LUT output terminal, acircuit having a first circuit input terminal and a second circuit inputterminal, and a first input terminal; wherein the LUT output terminal ofthe LUT is connected to the first circuit input terminal and the firstinput terminal is connected to the second circuit input terminal;

the second logic cell comprising: a LUT having a LUT output terminal,and a first output terminal, the first output terminal is connected tothe LUT output terminal;

the first output terminal of the second logic cell is connected to thefirst input terminal of the first logic cell, thereby a buddy logic isformed.

According to a third aspect, an integrated circuit having a plurality oflogic cells is provided. Each of said plurality of logic cellscomprising:

a first input terminal, a second input terminal, a third input terminal,a plurality of fourth input terminals, a first output terminal and asecond output terminal;

a LUT having a plurality of LUT input terminals, which are connectedrespectively to the plurality of fourth input terminals; and, a LUToutput terminal;

a first multiplexer having a first multiplexer input terminal, a secondmultiplexer input terminal, a multiplexer select terminal and anmultiplexer output terminal; wherein, the first multiplexer inputterminal of the first multiplexer is connected to the first inputterminal, the second multiplexer input terminal of the first multiplexeris connected to the third input terminal, and the multiplexer selectterminal may be programmed to let the first multiplexer pass on eitherof two signals appearing at the first multiplexer input terminal and thesecond multiplexer input terminal of the first multiplexer;

a second multiplexer having a first multiplexer input terminal, a secondmultiplexer input terminal, a multiplexer select terminal and anmultiplexer output terminal; wherein, the first multiplexer inputterminal of the second multiplexer is connected to the multiplexeroutput terminal of the first multiplexer, the second multiplexer inputterminal of the second multiplexer is connected to the LUT outputterminal, the multiplexer select terminal of the second multiplexer isconnected to the second input terminal and the multiplexer outputterminal of the second multiplexer is connected to the first outputterminal;

a circuit having a first circuit input terminal, a second circuit inputterminal, and a circuit output terminal; wherein, the first circuitinput terminal is connected to the LUT output terminal, the secondcircuit input terminal is connected to the third input terminal;

a third multiplexer having a first multiplexer input terminal, a secondmultiplexer input terminal, a third multiplexer input terminal, amultiplexer select terminal, and a multiplexer output terminal; wherein,the first multiplexer input terminal of the third multiplexer isconnected to the LUT output terminal, the second multiplexer inputterminal of the third multiplexer is connected to the multiplexer outputterminal of the second multiplexer, the third multiplexer input terminalof the third multiplexer is connected to the circuit output terminal ofthe circuit, and the multiplexer select terminal may be programmed topass on any one of the signals appearing at the first, second and thirdmultiplexer input terminals of the third multiplexer.

The above and other objects, features, and advantages of the presentinvention will become apparent from the following detailed descriptionthereof, which is described with reference to the accompanying drawingsin which the like reference numerals represent the same or similarelements.

BRIEF DESCRIPTION OF THE DRAWING

The exemplary embodiment(s) of the present invention will be understoodmore fully from the detailed description given below and from theaccompanying drawings of various embodiments of the invention, which,however, should not be taken to limit the invention to the specificembodiments, but are for explanation and understanding only.

FIG. 1 illustrates a basic logic cell including a LUT and a D flip-flop;

FIG. 2 illustrates a logic cell according to a first embodiment of thepresent invention;

FIG. 3 illustrates a logic cell according to a second embodiment of thepresent invention;

FIG. 4 illustrates a WLUT chain formed by logic cells as shown in FIG.2;

FIG. 5 illustrates a 5-input LUT (LUT5) formed by the WLUT chain of FIG.4;

FIG. 6 illustrates a bus multiplexer formed by the WLUT chain of FIG. 4;

FIG. 7 illustrates an example of interconnection between logic cells ina basic logic block;

FIG. 8 illustrates a logic cell according to a third embodiment of thepresent invention;

FIG. 9 illustrates a logic cell according to a fourth embodiment of thepresent invention;

FIG. 10 illustrates a buddy logic formed by logic cells as shown in FIG.8;

FIG. 11 illustrates another kind of buddy logic formed by logic cells asshown in FIG. 8;

FIG. 12 illustrates a further buddy logic formed by logic cells as shownin FIG. 8;

FIG. 13 illustrates a 32-bit decoder formed by using the buddy logic asshown in FIG. 10;

FIG. 14 illustrates placement of the LCs used to form 32-bit decoderwithin a basic logic block;

FIG. 15 illustrates how to build a LUT5 from two LCs using buddy logicwith 2-to-1 mux;

FIG. 16 illustrates a logic cell according to a fifth embodiment of thepresent invention;

FIG. 17 illustrates a logic cell according to a sixth embodiment of thepresent invention; and

FIG. 18 illustrates a hybrid placement pattern of buddy LCs used to form32-bit decoder and WLUT chains within basic logic blocks.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Please note that in the figures to be discussed below, each LC will havemore or less similar components, and throughout these figures, thosecomponents having basically the same function will be labeled withsimilar numbers, with the last digit in each of the labels being thesame.

FIG. 2 illustrates a logic cell according to a first embodiment of thepresent invention. As shown in FIG. 2, the logic cell 200 includes a4-input terminal LUT 202, a first multiplexer 204, a second multiplexer206, and a D flip-flop 208. The logic cell includes four inputterminals, ta0, ta1, ta2 and ta3, which are also input terminals of LUT210. The Logic cell includes two additional input terminals, i.e., tseland wlutin, and three output terminals, i.e., wlutout, regout andcombout.

LUT 202 has an output terminal. LUT 202 may implement any function offour variables.

The first multiplexer 204 has two data input terminals, input terminal 0and input terminal 1; an output terminal; and, a select terminal. Inputterminal 0 of the multiplexer 204 is connected to the output terminal ofLUT 202; Input terminal 1 is connected to the input terminal wlutin; theselect terminal is connected to the input terminal tsel, and may be usedto select which of the two inputs of multiplexer 204 will be output. Theoutput terminal of multiplexer 204 is connected to the output terminalwlutout.

The second multiplexer 206 has two data input terminals, input terminal0 and input terminal 1; an output terminal; and, a select terminal.Input terminal 1 of the second multiplexer 206 is connected to theoutput terminal of the first multiplexer 204 and input terminal 0 isconnected to output terminal of LUT 202. The select terminal is drivenby a static configuration bit. The output terminal of the secondmultiplexer 206 is connected to D input terminal of flip-flop 208 and tothe output terminal combout.

In operation, the select terminal of multiplexer 206 may be configuredappropriately to pass the output signal of LUT 202 through the secondmultiplexer 206 and then output both at output terminal regout via theflip-flop 208 and directly at the output terminal combout.

According to the present invention, the first multiplexer 204 is used tomultiplex signal from the input terminal wlutin and signal from theoutput terminal of LUT 202 and the multiplexed signal will be output atthe output terminal wlutout. The signal tsel may be used to select whichof the two will be output by the first multiplexer 204. If configuringthe select terminal of multiplexer 206 appropriately, the multiplexedsignal may also be output either at the terminal combout or at theterminal regout via D flip-flop 208.

In conclusion, a signal output by LUT 202 may be output at outputterminal wlutout via first multiplexer 204, at output terminal regoutvia multiplexer 206 and flip-flop 208, or at output terminal combout viamultiplexer 206.

Similarly, the LC 200 may receive a signal from the LUT of a neighboringLC at the input terminal wlutin, multiplex the signal at the firstmultiplexer 204, and then output at the output terminals wlutout,regout, or combout.

Therefore, a WLUT chain may be formed by a plurality of such LCs, byconnecting in chain the input terminal wlutin of one LC to the outputterminal wlutout of another LC. The term ‘WLUT’ means a wide LUT thathas more inputs than a standalone LUT has.

FIG. 3 illustrates a logic cell according to a second embodiment of thepresent invention. FIG. 3 differs from FIG. 2 in that it has only onemultiplexer 304, which corresponds to multiplexer 204 in FIG. 2, with amultiplexer 206 omitted. Multiplexer 304 functions to multiplex signalsfrom both input terminal tsel and output terminal of LUT 304. Therefore,a WLUT chain may be formed by connecting in chain input terminal wlutinand output terminals wlutout of such LCs 300.

In addition, LC 300 may function as a normal LC. By choosing signal atinput terminal tsel, the output of LUT 302 may be fed directly toD-input of D flip-flop 308 and output terminal combout.

FIG. 4 illustrates a WLUT chain formed by logic cells as shown in FIG.2. As shown in FIG. 4, there are 3 LCs, i.e., LC 410, LC 420 and LC 430.Each of the LC 410, LC 420, and LC 430 has the same structure as LC 200in FIG. 2. Therefore, the description of the detailed structure thereofwill be omitted for the sake of simplicity. Note that configurationmemory cells of the LUTs are not shown, just for the sake of simplicity,in this figure and some of the figures to be discussed below.

The output terminal wlutout of LC 410 is connected to the input terminalwlutin of LC 420 and the output terminal wlutout of LC 420 is connectedto the input terminal wlutin of LC 430.

A signal, which may be an output of the LUT of a neighboring LC, isinput at the input terminal wlutin into LC 410. In LC 410, it ismultiplexed with the output of LUT 412 at multiplexer 414, and themultiplexed signal is output via its output terminal wlutout; then, inLC 420, the signal from the output terminal wlutout of LC 410 ismultiplexed with the output signal of LUT 422 at multiplexer 424 andmultiplexed signal is output at its output terminal wlutout; and then,in LC 430, the signal from the output terminal wlutout of LC 420 ismultiplexed with the output signal of LUT 432 at multiplexer 434 and themultiplexed signal is output at its output terminal wlutout.

Thereby, a WLUT chain is formed, which is indicated by the thick blacklines from wlutin of LC 410 to wlutout of LC 430.

Please note that each LC in the LUT chain may select to pass on eitherits own LUT output or LUT outputs of upstream LCs in the chain. Forexample, by appropriately choosing signals at respective selectterminals tsel of the three LCs, the output signal of the LUT 412 of LC410 may be passed on along the chain to terminals wlutout of LC 410, LC420, and LC 430. Further, by appropriately programming the respectiveselect terminals of the multiplexers 416, 426, and 436, the outputsignal of LUT 412 of LC 410 may be output by any of the three LCs attheir respective output terminals, either combout or regout.

The WLUT chain as shown in FIG. 4 may be used to implement complex logicfunctions, such as LUT5 and bus multiplexer. Compared with similartraditional logic circuits, the WLUT chain approach uses fewer logiccells to implement some common logic functions. Also, performance willbe enhanced due to the fact that LUTs coupled with general purposeinterconnect have been replaced with multiplexers coupled with fasterdedicated WLUT chains.

FIG. 5 illustrates a 5-input LUT formed by the WLUT chain of FIG. 4. Asshown in FIG. 5, this LUT5 is formed by two LCs, LC 510 and LC 520. TheLC 510 and LC 520 have the same structure as LC 200 in FIG. 2.

The LUT5 has five input terminals, din 0, din 1, din 2, din 3 and din 4.signals from dins 0-3 are fed to both LUTs 512 of LC 510 and LUT 522 ofLC 520 at their respective input terminals ta0, ta1, ta2 and ta3. Bychoosing the terminal tsel of LC 510 to be a logic 0, the output signalof LUT 512 is selected to be output at terminal wlutout of LC 510 andmultiplexed with that of LUT 522 by multiplexer 524 of LC 520. A signalfrom din 4 is fed via input terminal tsel of LC 520 to select terminalof multiplexer 524 of LC520, and then, decide which is to be selected,output of LUT 512 or output of LUT 522. By appropriately programming LUT512, LUT 522 and select terminal of multiplexer 526, the logic circuitof FIG. 5 can implement a LUT5 using only two logic cells with a delaythat is slightly larger than that of a LUT4. This compares favorablywith the traditional approach of building a LUT5 out of 3 LUT4 with twolevels of LUT delay plus a slower general interconnect delay.

FIG. 6 illustrates a bus multiplexer formed by the WLUT chain of FIG. 4.As shown in FIG. 6, there are three basic logic blocks (referred belowas BLB), BLB 1, BLB 2, and BLB 3. BLB 1 includes LCs 1-1, 2-1, . . . ,and M-1; BLB 2 includes LCs 1-2, 2-2, . . . , and M-2; and, BLB 3includes LCs 1-3, 2-3, . . . , and M-3. Each of the LCs has the samestructure as LC200 in FIG. 2.

The three LCs, LC 1-1, LC 1-2 and LC 1-3, in the first row constitute aWLUT chain, in which the output of LUT 6112 of LC 1-1 and that of LUT6122 of LC 1-2 are multiplexed by multiplexer 6124 in LC 1-2, and thenmultiplexed with the output of LUT 6132 by multiplexer 6134.

Correspondingly, LC i-1, LC i-2 and LC i-3 in row i constitute a WLUTchain, wherein, i=2, . . . , M, respectively.

Please note that LCs 1-1, 2-1, . . . , and M-1 in BLB 1 share the sameselect signal tsel0 for their respective multiplexer 6 j 14; LCs 1-2,2-2, . . . , M-2 in BLB 2 share the same select signal tsel1 for theirrespective multiplexer 6 j 24; and, LCs 1-3, 2-3, . . . , M-3 in BLB 3share the same select signal tsel2 for their respective multiplexer 6 j34; wherein j=1, . . . , M. By choosing the signals tsel0 and tsel1, theLCs (thus, LUTs) in BLB 1 may inject their outputs to output terminalsof the corresponding LCs in BLB 2 or BLB 3. Therefore, the LCs in BLB 1embed an M-bit wide 2-to-1 multiplexer.

Similarly, the LCs (LUTs) in BLB 2 may inject their outputs to outputterminals of the corresponding LCs in BLB 2 or BLB 3, embedding an M-bitwide 2-to-1 multiplexer. The LCs (LUTs) in BLB 3 may inject theiroutputs to their own output terminals, embedding an M-bit wide 2-to-1multiplexer. These LCs in BLBs 1, 2 and 3 constitute in combination anM-bit wide 3-to-1 bus multiplexer.

Please note that a different combination of select signals tsel0, tsel1and tsel2 may lead to a different chain output at the rightmost terminalw/utout of the chain. Let us define that signals tsel0, tsel 1, andtsel2 equal to ‘0’ represent that they inject LUT outputs of the LCswhich they are driving onto the chain, and signals equal to ‘1’represent that they inject LUT output from adjacent upstream LC onto thechain.

In case that there is only one signal among the three signals equal to‘0’, i.e., {0, 1, 1}, {1, 0, 1}, {1, 1, 0}, the LUT output of the LCbeing driven by signal ‘0’ will be passed on to the chain output.

In case that there is at least two signal among the three signals equalto ‘0’, i.e., {0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, the LUT outputthat belong to the LC rightmost being driven by signal ‘0’ will bepassed on to the chain output. Therefore, a priority may arise from sucha big bus multiplexer. In an example, the logic function with highestpriority is preferred to be placed at the rightmost side of the busmultiplexer and the logic function with lowest priority may be arrangedat the left side.

Although an M-bit wide 3-to-1 bus multiplexer has been shown in thefigure, it may be extended to be an M-bit wide N-to-1 bus multiplexer,which will be formed by M×N LUTs and M×N multiplexers. Of course, thenumber of tsel signals shall be increased to N.

In the M-bit wide N-to-1 bus multiplexer, each LC may have differentinput signals for their respective LUT, or share the same set of inputsignals with some or all of the other LCs.

In one scenario, LUTs in each BLB share one and the same set of wideinput signals but performs different algorithm operations, such as ADDand SUB. By choosing the bus selection signals, different algorithmoperation result may be selected to output.

In another scenario, LUTs in each BLB may have different input signalsand output different address signals. By choosing the bus selectionsignals, different addresses may appear at corresponding outputterminals.

In an embodiment, carry chains may be added to LUTs of at least a partof the LCs so as to carry out particular algorithms in the busmultiplexer.

Integrated circuit having the bus multiplexer as set forth aboveoccupies less area because groups of LUTs have been omitted. Also, thebus multiplexer leads to a shorter delay since fixed connections areadopted. Taking the leftmost LUT for example, it goes through 3multiplexers to reach the rightmost output terminal of the busmultiplexer.

Please note that, in FIG. 6, terminals wlutin of LCs are connected toterminals wlutout of respective adjacent LCs. The other input and outputterminals of the LCs will be connected via switch boxes within the sameBLB or between BLBs. FIG. 7 illustrates an example of interconnectionbetween logic cells in a basic logic block. Within the BLB, LC-0, LC-1,. . . , LC-14 and LC-15 have their respective inputs ta0, ta1, ta2, ta3;and outputs regout and combout. The inputs ta0-ta3 and outputs regoutand combout of LC-0 are connected to a switch box of the BLB, from whichLC-0 may be routed to other LCs within the same BLB or to outside LCsvia input terminal umi and output terminal umo of the BLB. Similarly,each of LC-1, . . . , LC-14 and LC-15 may be routed to other LCs withinthe same BLB or to LCs outside through the switch box. Although notshown in FIG. 7, input terminals tsel will also be connected to theswitch box so as to be routed to other LCs within the same BLB oroutside.

Please note that although the integrated circuits in FIGS. 4-6 are shownto consist of logic cells as shown in FIG. 2, they may also be formed bylogic cells as shown in FIG. 3.

FIG. 8 illustrates a logic cell according to a third embodiment of thepresent invention. As shown, LC 800 has a 4-input LUT 802, a NOR gate803, a multiplexer 806, and a D flip-flop 808. The LC 800 includes fourinput terminals, ta0, ta1, ta2 and ta3, which are also input terminalsof LUT 802. The LC includes two output terminals, i.e., regout andcombout. Besides, the LC includes another input terminal lutin andanother output terminal lutout.

In addition to the 4 input terminals, ta0, ta1, ta2 and ta3, LUT 802 hasan output terminal, which is connected to the output terminal lutout.The NOR gate 803 has two data input terminals, and an output terminal.One of the Input terminals of the multiplexer 803 is connected to outputterminal of the LUT 802 and the other input terminal is connected to theinput terminal lutin.

The multiplexer 806 has two data input terminals, input terminal 0 andinput terminal 1; an output terminal; and, a select terminal. Inputterminal 0 of the multiplexer 806 is connected to the output terminal ofNOR gate 803, and input terminal 1 is connected directly to the outputterminal of the LUT 802. The select terminal is driven by a staticconfiguration bit. The output terminal of the multiplexer 806 isconnected to D input terminal of flip-flop 808 and to the outputterminal combout.

In operation, the select terminal of multiplexer 806 may be programmedto select the signal at input terminal 1 of multiplexer 806, which isthe output of LUT802, as the output of the multiplexer 806. Then, thesignal will be passed on to output terminal combout or at outputterminal regout via flip-flop 808.

In another approach, a signal, which may be an output from the LUT of aneighboring LC, is input into LC 600 at the input terminal lutin. Thesignal is then NORed with the output signal of LUT 802 and the resultingsignal is input into the multiplexer 806 at input terminal 0. Byconfiguring the select terminal, the NORed signal may be output directlyat the output terminal combout, or output via flip-flop 808 to outputterminal regout.

Thereby, a buddy logic may be formed, in which a NOR gate carries out aNOR operation with respect to an output of LUT 802 and an output fromLUT(s) in another LC.

FIG. 9 illustrates a logic cell according to a fourth embodiment of thepresent invention. This embodiment differs from FIG. 8 in that the NORgate 803 is replaced with a multiplexer 905, which has a select terminalconnected to input terminal tsel of the LC.

In operation, output signal of LUT 902 appearing at input terminal 1 ofmultiplexer 906 may be selected by multiplexer 906 and output at outputterminal combout or at output terminal regout via flip-flop 908.

In another approach, a signal, which may be an output from the LUT of aneighboring LC, is input into LC 900 at the input terminal lutin. Thesignal is then multiplexed in multiplexer 905 with the output of LUT902. By choosing the signal tsel, either the output of LUT 902 or thatfrom the neighboring LC is selected by multiplexer 905 to output to themultiplexer 906 at its input terminal 0. In multiplexer 906, ifprogramming its select terminal appropriately, the multiplexed signalfrom multiplexer 905 may be output directly at the output terminalcombout, or at output terminal regout via flip-flop 908. Thereby, abuddy logic may be formed, in which a multiplexer carries out amultiplex operation with respect to an output of LUT 902 and an outputfrom another LUT in physically neighboring LC.

It would be appreciated that, instead of NOR and multiplexer asmentioned above, other circuit such as AND, NAND, OR and XOR gate mayalso be adopted to form a buddy logic.

Further, the buddy logic may be formed by more than 2 LUTs, instead ofpaired LUTs. For example, outputs of a first LUT, a second LUT, and athird LUT may be connected respectively to input terminals of a circuitsuch as multiplexer, AND, NAND, OR, NOR and XOR to form a buddy logic.

The buddy logic can be adopted to implement certain logic operations.The resulting integrated circuit will occupy less area because lessnumber of cells is needed. In addition, the performance will be enhanceddue to the fact that LUTs having slower speed have been replaced withmuch faster logics. Further, compared with a long chain, the buddy logicuses only a dedicated LC-to-LC link, coupling either the nearest LCeither above or below, and thus placement of the two buddy LCs are veryflexible.

FIG. 10 illustrates a buddy logic formed by logic cells as shown in FIG.8. As shown, there are three LCs, LC 1010, LC 1020 and LC 1030. Each LChas the same structure as the LC in FIG. 8. The output terminal lutoutof LC 1030 is connected to input terminal lutin of LC 1020 and theoutput terminal lutout of LC 1020 is connected to input terminal lutinof LC 1010.

In operation, output signal of LUT 1032 is fed at the output terminallutout of LC 1030 to LC 1020. In LC 1020, NOR gate 1023 carries out aNOR operation with respect to the output of LUT 1032 and the output fromLUT 1022. By configuring select signal of multiplexer 1026, the NORedsignal may be selected to output, either at output terminal combout orat output terminal regout via D flipflop 1028.

Similarly, output of LUT 1022 and the output from LUT 1012 are NORed byNOR gate 1013 and may be selected to output, either at output terminalcombout of LC 1010 or at output terminal regout via D flipflop 1018.

The buddy logic may thus be used to implement efficiently many commonlogic functions, such as decoders and encoders.

Please note that in FIG. 10, the NORed signal by multiplexer 1016 couldonly be output in LC 1010. That is, the output of LUT 1012 and LUT 1022could only be NORed and output in LC 1010. FIG. 11 and FIG. 12illustrate different buddy logics.

As shown in FIG. 11, there are three LCs, LC 1110, LC 1120, and LC 1130,which differ from LC 810 of FIG. 8 in that they have two pairs of lutoutand lutin terminals and a three-input multiplexer instead of a two-inputmultiplexer. The two pair of lutout and lutin terminals are re-marked asulutout and ulutin, dlutout and dlutin since the upper terminals ulutoutand ulutin are to be connected to a upper adjacent LC and the lowerterminals dlutout and dlutin are to be connected to a downwards adjacentLC.

In LC 1110, terminal ulutout is connected to the output terminal of LUT1112, and terminal dlutin is connected to one of the two inputs of NORgate 1113. Terminals ulutin and dlutout are respectively connected toinput 2 of multiplexer 1116 and output terminal of NOR gate 1113.

LC 1120 and LC 1130 have the same structure as LC 1110.

Terminals dlutin and dlutout of LC 1110 are connected respectively toterminals ulutout and ulutin of LC 1120; Terminals dlutin and dlutout ofLC 1120 are connected respectively to terminals ulutout and ulutin of LC1130.

Therefore, NOR gate 1113 of LC 1110 conducts a NOR operation withrespect to output of LUT 1112 and output of LUT 1122, and passes theNORed signal on to both input 0 of multiplexer 1116 and input 2 ofmultiplexer 1126, and thus the NORed signal may be output via both LC1110 and LC 1120. Similarly, NORed signal formed by output of LUT 1122and output of LUT 1132 may be output via both LC 1120 and LC 1130.

FIG. 12 illustrates a different approach. In this case, LC 1210, LC1220, and LC 1230 are similar to those of LCs 1110, 1120, and 1130. Thedifference is that each of LC 1210, LC 1220, and LC 1230 has athree-input NOR gate and two-input multiplexer instead of a three-inputmultiplexer and a two-input NOR gate.

In LC 1210, input terminal ulutin is connected to one of the threeinputs of NOR gate 1213 and output terminal of LUT 1212 is connected toterminal dlutout. LC 1220 and LC 1230 have the same structure as LC1210.

Terminals dlutin and dlutout of LC 1210 are connected respectively toterminals ulutout and ulutin of LC 1220; Terminals dlutin and dlutout ofLC 1220 are connected respectively to terminals ulutout and ulutin of LC1230.

In operation, NOR gate 1223 of LC 1220 receives output of LUT 1212,output of LUT 1222, and output of LUT 1232 and conducts a NOR operationwith respect to them. The NORed signal may be selected by multiplexer1226 to pass on and output via output terminal combout or regout of LC1220. Please note that this buddy logic has a three input instead of thetwo input as shown in both FIG. 10 and FIG. 11.

FIG. 13 illustrates a 32-bit decoder formed by buddy logics. As shown inFIG. 13, there are 9 LCs, LC 1310, 1320, . . . and 1390 in a BLB. Eachof LC 1310-1380 is the same as the LC in FIG. 8 and is connected inchain with each other to form a buddy logic. For example, in LC 1310,output of LUT 1312 in LC 1310 and output of LUT 1322 in LC 1320 areNORed by NOR gate 1313 and the NORed signal is input at input terminal 0of multiplexer 1316.

Similarly, in LC 1330, output of LUT 1332 in LC 1330 and output of LUT1342 in LC 1340 are NORed by NOR gate 1333 and the NORed signal is inputat input terminal 0 of multiplexer 1336; In LC 1350, output of LUT 1352in LC 1350 and output of LUT 1362 in LC 1360 are NORed by NOR gate 1353and the NORed signal is input at input terminal 0 of multiplexer 1356;In LC 1370, output of LUT 1372 in LC 1370 and output of LUT 1382 in LC1380 are NORed by NOR gate 1373 and the NORed signal is input into inputterminal 0 of multiplexer 1376. The output terminals of multiplexers1316, 1336, 1356, and 1376 are respectively connected, via terminalscombout of respective LCs, to input terminals ta3, ta2, ta1, ta0 of LUT1392 of LC 1390, which may have the same structure as LCs 1310-1380. InLC 1390, the output of LUT 1392 may be selected to output by multiplexer1396. By appropriately configuring select terminal of multiplexer 1316,1336, 1356, 1376 and 1396, a 32-bit decoder may thus be achieved.

In operation, a 32-bit input signal is input into the decoder. Thissignal is split into groups of sub-signals, din[3:0], din[7:4],din[11:8], din[15:12], din[19:16], din[23:20], din[27:24], din[31:28],which are respectively input via input terminals ta0, ta1, ta2, ta3,into LCs 1310-1380. When the 32-bit input signal is equal to aparticular number, the 32:1 decoder will output ‘1’ at terminal dout orterminal combout; otherwise, output thereof is 0.

The decoder above runs faster and occupies less area because some LUTsare omitted. In fact, it achieves the theoretical minimal depth of twoLCs, as it is impossible to implement using only one level of LC withLUT4. Further, although the buddy logics have been shown connected toeach other, each pair of buddy LC can be placed anywhere within the BLB.Therefore, the decoder thus formed may have a flexible placement due tointerchangeability between the LCs.

FIG. 14 illustrates a placement pattern of the LCs used to form 32-bitdecoder within a basic logic block. In FIG. 14, 4 LC pairs and a singleLC used to form 32-bit decoder as shown in FIG. 13 are placedrespectively in first-second, sixth-seventh, ninth-tenth,13^(th)-14^(th), and 16^(th) LC positions of a BLB. It will beappreciated that these LC pairs and LC may be placed in the BLB randomlydue to the flexible placement requirement of buddy logics. There may bethousands of different ways of placement to place the 32-bit decoderwithin a BLB.

FIG. 15 illustrates how to build a LUT5 from two LCs using buddy logicwith 2-to-1 mux. As shown in FIG. 15, LC 1510 and LC 1520 have the samestructure as LC 900 in FIG. 9. The LUT5 has five input terminals, din0,din1, din2, din3 and din4. Signals from din[3:0] are fed to both LUT1512 of LC 1510 and LUT 1522 of LC 1520 at their respective inputterminals ta0, ta1, ta2 and ta3; and, din4 is connected to inputterminal tsel of LC 1510. Input terminal lutin of LC 1510 is connectedto output terminal lutout of LC 1520. The select terminal of multiplexer1516 is programmed to pass output signal of multiplexer 1515 through.

In operation, multiplexer 1515 functions to multiplex output of LUT 1512and output of LUT 1522. By appropriately programming LUT 1512 and LUT1522, the logic circuit of FIG. 15 can implement a LUT5 using only twologic cells with a delay that is slightly larger than that of a LUT4.This compares favorably with the traditional approach of building a LUT5out of 3 LUT4 with two levels of LUT delay plus a slower generalinterconnect delay.

FIG. 16 illustrates a logic cell according to a fifth embodiment of thepresent invention.

LC 1600 as shown in FIG. 16 differs from LC 200 in FIG. 2 in that itfurther comprises a NOR gate 1603 having two input terminals and anoutput terminal; an input terminal lutin and an output terminal lutout;and, the multiplexer 1606 has three input terminals, i.e., inputterminals 0, 1, and 2, instead of two input terminals. One of the inputterminals of NOR gate 1603 is connected to output terminal of LUT 1602and the other one is connected to input terminal lutin of the LC 1600.The output terminal of NOR gate 1603 is connected to input terminal 2 ofmultiplexer 1606. Input terminal 0 of multiplexer 1606 is connected tothe output terminal of LUT 1602 and input terminal 1 of multiplexer 1606is connected to output terminal of multiplexer 1604.

As mentioned above, a plurality of LCs 1600 having multiplexer 1604 mayconstitute a WLUT chain while two LCs 1600 having NOR gate 1603 mayconstitute a buddy logic. Therefore, a combination of buddy logic andWLUT chain may be formed by a plurality of LCs 1600.

FIG. 17 illustrates a logic cell according to a sixth embodiment of thepresent invention. LC 1700 in FIG. 17 differs from LC 1600 of FIG. 16mainly in that it replaces multiplexer 1604 with a multiplexer 1707 anda multiplexer 1704. Further, LC 1700 is shown to have a NOT gate 1701.

Multiplexer 1707 has two input terminals, input terminal 0 and inputterminal 1; an output terminal; and, a select terminal. Input terminal 0of multiplexer 1707 is connected to the input terminal lutin of the LC,which may receive an output signal from the LUT of another LC downward.Input terminal 1 of multiplexer 1707 is connected to the input terminalwlutin of the LC, which may receive an output from the LUT of another LCto the left. Multiplexer 1707 multiplexes the two input signals, and theselect terminal decides which of the two input signals to be selectedand passed on.

Multiplexer 1704 has also two input terminals, input terminal 0 andinput terminal 1; an output terminal; and, a select terminal. The inputterminal 1 of multiplexer 1704 is connected to the output terminal ofmultiplexer 1707; input terminal 0 of multiplexer 1704 is connected tothe output terminal of LUT 1702; the input terminal tsel is connected tothe select terminal of multiplexer 1704 and decide which of the twoinputs will be selected and passed on. The output terminal ofmultiplexer 1704 is connected to input terminal 1 of multiplexer 1706.

In operation, multiplexer 1707 may receive via input terminal wlutinoutput of the LUT of another LC to the left and pass it on tomultiplexer 1704, which receive also the output of LUT 1702. Multiplexer1704 may select one of them and pass it on to output terminal wlutout ofthe LC. Therefore, a plurality of LCs 1700 having multiplexer 1707 andmultiplexer 1704 may constitute a WLUT chain.

Further, multiplexer 1707 may receive at its input terminal 0 output ofthe LUT of another LC downwards and pass it on to multiplexer 1704,which receives also output of LUT 1702. Therefore, two LCs havingmultiplexer 1707 and multiplexer 1704 may constitute a buddy logic.

Further, two LCs having the NOR gate 1703 constitutes another buddylogic. The NOT gate 1701 has its input terminal connected to outputterminal of NOR gate 1703 and its output terminal connected to input 3of multiplexer 1706. Those skilled in the art will recognize that bythis kind of arrangement, LC1700 may implement all of the fouralgorithms, NOR, OR, NAND, AND.

FIG. 18 illustrates a hybrid placement pattern of buddy LCs used to form32-bit decoder and WLUT chains within basic logic blocks. As shown inFIG. 18, there are 3 BLBs, each having 16 LCs. LCs having vertical linepattern are used to form WLUT chains while LCs having grid pattern areused to form a 32-bit decoder. Due to the fact that buddy logics areformed in short ‘chain’, the buddy logics may be flexibly placed amongLCs unoccupied by WLUT chains. Therefore, integrated circuits with greatflexibility will be achieved.

The LCs and integrated circuits formed therefrom according to thepresent invention may not be limited to FPGA circuit, but alsoapplicable to any integrated circuit embedded with FPGA, such as CSoCand PSoC. Further, the LCs and integrated circuits formed therefrom maybe interconnected with various interconnect networks.

While there has been described in connection with the preferredembodiments of the invention, it will be obvious to those skilled in theart that various changes and modifications may be made therein withoutdeparting from the invention. For example, although the LUTs asmentioned above have been shown to have 4 input terminals, they may haveany other number of input terminals. In addition, D flip-flops may bereplaced with any other kind of flip-flops.

It is aimed, therefore, to cover in the appended claims all such changesand modifications as fall within the true spirit and scope of theinvention, which is defined by the metes and bounds of the appendedclaims.

1. An integrated circuit having a plurality of logic cells, each of saidplurality of logic cells comprising: a first input terminal (wlutin), asecond input terminal (tsel), a third input terminal (lutin), aplurality of fourth input terminals (ta0, ta1, ta2, ta3), a first outputterminal (wlutout) and a second output terminal (lutout); a LUT (1702)having a plurality of LUT input terminals, which are connectedrespectively to the plurality of fourth input terminals; and, a LUToutput terminal; a first multiplexer (1707) having a first multiplexerinput terminal, a second multiplexer input terminal, a multiplexerselect terminal and an multiplexer output terminal; wherein, the firstmultiplexer input terminal of the first multiplexer is connected to thefirst input terminal, the second multiplexer input terminal of the firstmultiplexer is connected to the third input terminal, and themultiplexer select terminal may be programmed to let the firstmultiplexer pass on either of two signals appearing at the firstmultiplexer input terminal and the second multiplexer input terminal ofthe first multiplexer; a second multiplexer (1704) having a firstmultiplexer input terminal, a second multiplexer input terminal, amultiplexer select terminal and an multiplexer output terminal; wherein,the first multiplexer input terminal of the second multiplexer isconnected to the multiplexer output terminal of the first multiplexer,the second multiplexer input terminal of the second multiplexer isconnected to the LUT output terminal, the multiplexer select terminal ofthe second multiplexer is connected to the second input terminal and themultiplexer output terminal of the second multiplexer is connected tothe first output terminal (wlutout); a circuit (1703) having a firstcircuit input terminal, a second circuit input terminal, and a circuitoutput terminal; wherein, the first circuit input terminal is connectedto the LUT output terminal, the second circuit input terminal isconnected to the third input terminal; a third multiplexer (1706) havinga first multiplexer input terminal, a second multiplexer input terminal,a third multiplexer input terminal, a multiplexer select terminal, and amultiplexer output terminal; wherein, the first multiplexer inputterminal of the third multiplexer is connected to the LUT outputterminal, the second multiplexer input terminal of the third multiplexeris connected to the multiplexer output terminal of the secondmultiplexer, the third multiplexer input terminal of the thirdmultiplexer is connected to the circuit output terminal of the circuit,and the multiplexer select terminal may be programmed to pass on any oneof the signals appearing at the first, second and third multiplexerinput terminals of the third multiplexer.
 2. An integrated circuit asclaimed in claim 1, wherein, by coupling in chain the first inputterminal (wlutin) of one of the plurality of logic cells to the firstoutput terminal (wlutout) of another one of the plurality of logiccells, a WLUT chain is formed when the select terminal of the firstmultiplexer of each of the plurality of logic cells is programmed topass on signals at the first multiplexer input of the same firstmultiplexer.
 3. An integrated circuit as claimed in claim 1, wherein, bycoupling the third input terminal of a first one of the plurality oflogic cells to the second output terminal of a second one of theplurality of logic cells, a buddy logic is formed between the firstlogic cell and the second logic cell.
 4. An integrated circuit asclaimed in claim 1, wherein, by coupling the third input terminal of athird one of the plurality of logic cells to the second output terminalof a fourth one of the plurality of logic cells, a buddy logic is formedbetween the first logic cell and the second logic cell when the selectterminal of the first multiplexer is programmed to pass on signal at thesecond input terminal of the first multiplexer.
 5. An integrated circuitas claimed in claim 1, wherein said circuit is chosen from the groupincluding an AND gate, NAND gate, OR gate, NOR gate and XOR gate.
 6. Anintegrated circuit as claimed in claim 5, wherein said third multiplexerhas a fourth multiplexer input terminal; each of said plurality of logiccells includes a NOT gate, the input terminal of which is connected tooutput terminal of the circuit, and the output terminal of which isconnected to the fourth multiplexer input terminal of the fourthmultiplexer.
 7. An integrated circuit as claimed in claim 1, whereinsaid circuit comprises a multiplexer or multiplexers.